package string;

import org.omg.CORBA.SetOverrideType;

import java.net.SocketTimeoutException;

/**
 * char charAt(int index)
 * 返回当前字符串中指定下标处对应的字符
 */
public class CharAtDemo {
    public static void main(String [] args){
        String str = "thinking in java";

        char st=str.charAt(5);//返回当前字符串中指定下标处对应的字符
        System.out.println(st);
        for(int i=0;i<str.length();i++) {
            char s=str.charAt(i);
            System.out.println(s);
        }
    }
}
